// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'StockInDetailId',
        footer: "Foots",
        cnName: '入库明细',
        name: 'StockInDetail',
        newTabEdit: false,
        url: "/StockInDetail/",
        sortName: "StockInDetailId"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"MaterialNo":"","MaterialName":"","Spec":"","LotText":"","Price":"","Qty":"","Amount":"","CostItemId":"","StockId":"","LocationId":"","Remark":""};
    const editFormOptions = [[{"title":"批号","field":"LotText"},
                               {"title":"物料编码","required":true,"field":"MaterialNo","disabled":true,"type":"text"},
                               {"title":"物料名称","required":true,"field":"MaterialName","disabled":true,"type":"text"},
                               {"title":"规格型号","field":"Spec","disabled":true,"type":"text"},
                               {"title":"入库成本","field":"Price","type":"decimal"},
                               {"title":"入库数量","required":true,"field":"Qty","type":"decimal"},
                               {"title":"成本金额","field":"Amount","disabled":true,"type":"decimal"},
                               {"dataKey":"成本对象","data":[],"title":"成本对象","field":"CostItemId","type":"select"},
                               {"dataKey":"仓库new","data":[],"title":"仓库","required":true,"field":"StockId","type":"select"},
                               {"dataKey":"仓位","data":[],"title":"仓位","field":"LocationId","type":"select"},
                               {"title":"备注","field":"Remark","type":"textarea"}]];
    const searchFormFields = {};
    const searchFormOptions = [];
    const columns = [{field:'StockInDetailId',title:'产品入库明细标识',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'StockInId',title:'产品入库标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'MaterialId',title:'物料标识',type:'int',width:110,hidden:true,require:true,align:'left'},
                       {field:'MaterialNo',title:'物料编码',type:'string',width:110,readonly:true,require:true,align:'left'},
                       {field:'MaterialName',title:'物料名称',type:'string',width:110,readonly:true,require:true,align:'left'},
                       {field:'Spec',title:'规格型号',type:'string',width:110,readonly:true,align:'left'},
                       {field:'LotMaterialId',title:'批号明细标识',type:'int',width:80,hidden:true,align:'left'},
                       {field:'LotText',title:'批号',type:'string',width:110,align:'left'},
                       {field:'Price',title:'入库成本',type:'decimal',width:110,align:'left'},
                       {field:'Qty',title:'入库数量',type:'decimal',width:110,require:true,align:'left'},
                       {field:'IsLoted',title:'启用批次',type:'int',width:80,align:'left'},
                       {field:'Amount',title:'成本金额',type:'decimal',width:110,readonly:true,align:'left'},
                       {field:'CostItemId',title:'成本对象',type:'int',bind:{ key:'成本对象',data:[]},width:110,align:'left'},
                       {field:'StockId',title:'仓库',type:'int',bind:{ key:'仓库new',data:[]},width:110,require:true,align:'left'},
                       {field:'LocationId',title:'仓位',type:'int',bind:{ key:'仓位',data:[]},width:110,align:'left'},
                       {field:'Remark',title:'备注',type:'string',width:180,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}